package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StudentProjectDescriptionMapper;
import com.ruoyi.system.domain.StudentProjectDescription;
import com.ruoyi.system.service.IStudentProjectDescriptionService;

/**
 * 学生项目描述 服务层实现
 * 
 * @author ruoyi
 */
@Service
public class StudentProjectDescriptionServiceImpl implements IStudentProjectDescriptionService 
{
    @Autowired
    private StudentProjectDescriptionMapper studentProjectDescriptionMapper;

    /**
     * 查询学生项目描述
     * 
     * @param id 学生项目描述主键
     * @return 学生项目描述
     */
    @Override
    public StudentProjectDescription selectStudentProjectDescriptionById(Long id)
    {
        return studentProjectDescriptionMapper.selectStudentProjectDescriptionById(id);
    }

    /**
     * 根据学号查询学生项目描述
     * 
     * @param studentNum 学号
     * @return 学生项目描述
     */
    @Override
    public StudentProjectDescription selectStudentProjectDescriptionByStudentNum(String studentNum)
    {
        return studentProjectDescriptionMapper.selectStudentProjectDescriptionByStudentNum(studentNum);
    }

    /**
     * 根据学生ID查询学生项目描述
     * 
     * @param studentId 学生ID
     * @return 学生项目描述
     */
    @Override
    public StudentProjectDescription selectStudentProjectDescriptionByStudentId(Long studentId)
    {
        return studentProjectDescriptionMapper.selectStudentProjectDescriptionByStudentId(studentId);
    }

    /**
     * 查询学生项目描述列表
     * 
     * @param studentProjectDescription 学生项目描述
     * @return 学生项目描述
     */
    @Override
    public List<StudentProjectDescription> selectStudentProjectDescriptionList(StudentProjectDescription studentProjectDescription)
    {
        return studentProjectDescriptionMapper.selectStudentProjectDescriptionList(studentProjectDescription);
    }

    /**
     * 新增学生项目描述
     * 
     * @param studentProjectDescription 学生项目描述
     * @return 结果
     */
    @Override
    public int insertStudentProjectDescription(StudentProjectDescription studentProjectDescription)
    {
        studentProjectDescription.setCreateTime(DateUtils.getNowDate());
        return studentProjectDescriptionMapper.insertStudentProjectDescription(studentProjectDescription);
    }

    /**
     * 修改学生项目描述
     * 
     * @param studentProjectDescription 学生项目描述
     * @return 结果
     */
    @Override
    public int updateStudentProjectDescription(StudentProjectDescription studentProjectDescription)
    {
        studentProjectDescription.setUpdateTime(DateUtils.getNowDate());
        return studentProjectDescriptionMapper.updateStudentProjectDescription(studentProjectDescription);
    }

    /**
     * 批量删除学生项目描述
     * 
     * @param ids 需要删除的学生项目描述主键
     * @return 结果
     */
    @Override
    public int deleteStudentProjectDescriptionByIds(Long[] ids)
    {
        return studentProjectDescriptionMapper.deleteStudentProjectDescriptionByIds(ids);
    }

    /**
     * 删除学生项目描述信息
     * 
     * @param id 学生项目描述主键
     * @return 结果
     */
    @Override
    public int deleteStudentProjectDescriptionById(Long id)
    {
        return studentProjectDescriptionMapper.deleteStudentProjectDescriptionById(id);
    }
}
